package com.qjq.glasses_shopping.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qjq.glasses_shopping.pojo.Role;
import org.apache.ibatis.annotations.Param;

public interface RoleMapper extends BaseMapper<Role> {
    //根据id查询角色全部信息
    Role findById(Long id);
    //删除角色的所有权限
    void deleteRoleAllPermission(Long rid);
    //删除角色对应的用户表
    void deleteRoleAllAdmin(Long rid);
    //给角色添加权限
    void addPermissionToRole(@Param("rid") Long rid,@Param("pid") Long pid);
}
